package licode.unisop.auth.client.api;

import licode.unisop.auth.client.info.Credential;
import licode.unisop.auth.client.info.LoginCodeIn;
import licode.unisop.auth.client.info.LoginContextIn;
import licode.unisop.auth.client.info.PlatformAuthIn;
import licode.unisop.client.info.SopTokenInfo;
import licode.unisop.client.vo.SopAuthPlatform;
import licode.unisop.client.vo.SopAuthResult;
import licode.unisop.client.vo.SopAuthUser;

/**
 * 定义A通过用户名和密码直接认证的接口
 *
 * @author WR
 */
public interface UniAuthorService {
    SopAuthResult authorize(LoginContextIn context);
    SopAuthUser login(LoginContextIn context);
    SopAuthUser token(LoginCodeIn req);
    Credential refresh(SopTokenInfo tokenInfo);
    void logout(SopTokenInfo tokenInfo);
    void logoutSso(SopTokenInfo tokenInfo);
    void logoutSession(SopTokenInfo tokenInfo);
    SopAuthPlatform registerPlatform(PlatformAuthIn platformAuthIn);
}
